#ifndef TESTDIALOG_H
#define TESTDIALOG_H

#include <QTreeWidget>
#include <QStandardItem>
#include <QMainWindow>
#include <QQueue>
#include <QCheckBox>
#include <QStackedWidget>
#include <QRadioButton>



QT_BEGIN_NAMESPACE
class QComboBox;
class QDialogButtonBox;
class QGridLayout;
class QGroupBox;
class QLabel;
class QPushButton;
class QSpinBox;
class QLineEdit;
class QTabWidget;
class Dialog;
class Register;
class MainWindow;
class QStackWidget;
QT_END_NAMESPACE

/** Class Dialog. Represents the content of the main window. Inherits from the QT class QWidget.
    When a new file is opened or created, a new Dialog class is built and the old one is destroyed.*/
class TestDialog : public QWidget
{
    Q_OBJECT

public:
    TestDialog(MainWindow *big);

    QTreeView* getTestListWidget(){return testListWidget;};

     bool isModified(){return layoutModified;};


    MainWindow* getWindow(){return bigWindow;};
    void setWindow(MainWindow* w){bigWindow=w;};
void updateComboBox();


public slots:
    void hasChanged();


private slots:

    void generateTestFile();
    void addTestCase();
    void autoGenerate();
void updateFieldCombo(int i);
void delTestCase();

private:
    void createEditingArea();
    void createListArea();



      bool layoutModified;
    int devBits;


    //! Pointer to the parent MainWindow
    MainWindow *bigWindow;




    QComboBox *operationType;
    QComboBox *regs;
    QComboBox *fields;
    QLabel *valueLabel;
    QLineEdit *value;
    QSpinBox *sec;
QPushButton *addTestButton;
QPushButton *delTestButton;
QPushButton *genTestFile;
QPushButton *autoGenButton;

    QGridLayout *mainLayout;

    //! QWidget displaying a list of tests
    QTreeWidget *testListWidget;


};




#endif
